<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>OA系统接口异常分析与解决方案</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            color: #333;
        }
        
        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
        }
        
        header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            width: 100%;
        }
        
        h1 {
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: 2.5rem;
        }
        
        .subtitle {
            color: #7f8c8d;
            font-size: 1.2rem;
        }
        
        .content {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
        }
        
        .error-panel {
            flex: 1;
            min-width: 300px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            padding: 25px;
            text-align: center;
        }
        
        .error-icon {
            font-size: 80px;
            color: #e74c3c;
            margin-bottom: 20px;
        }
        
        .error-title {
            font-size: 24px;
            color: #e74c3c;
            margin-bottom: 15px;
        }
        
        .error-desc {
            color: #7f8c8d;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .test-panel {
            flex: 2;
            min-width: 500px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            padding: 25px;
        }
        
        .panel-title {
            font-size: 20px;
            color: #2c3e50;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #eee;
            display: flex;
            align-items: center;
        }
        
        .panel-title i {
            margin-right: 10px;
            color: #3498db;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #2c3e50;
        }
        
        input, select {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 16px;
            transition: border-color 0.3s;
        }
        
        input:focus, select:focus {
            border-color: #3498db;
            outline: none;
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }
        
        .btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            transition: background 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn i {
            margin-right: 8px;
        }
        
        .btn:hover {
            background: #2980b9;
        }
        
        .btn-test {
            background: #2ecc71;
            width: 100%;
        }
        
        .btn-test:hover {
            background: #27ae60;
        }
        
        .response-area {
            margin-top: 30px;
        }
        
        .response-title {
            font-size: 18px;
            margin-bottom: 10px;
            color: #2c3e50;
        }
        
        .response-content {
            background: #f8f9fa;
            border: 1px solid #eee;
            border-radius: 6px;
            padding: 15px;
            min-height: 200px;
            max-height: 300px;
            overflow-y: auto;
            font-family: monospace;
            white-space: pre-wrap;
        }
        
        .troubleshoot {
            margin-top: 40px;
            width: 100%;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            padding: 25px;
        }
        
        .troubleshoot-title {
            font-size: 22px;
            color: #2c3e50;
            margin-bottom: 20px;
            text-align: center;
        }
        
        .steps {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
        }
        
        .step {
            flex: 1;
            min-width: 250px;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
        }
        
        .step-number {
            width: 40px;
            height: 40px;
            background: #3498db;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            font-weight: bold;
        }
        
        .step-title {
            font-size: 18px;
            margin-bottom: 10px;
            color: #2c3e50;
        }
        
        .step-desc {
            color: #7f8c8d;
            line-height: 1.5;
        }
        
        footer {
            margin-top: 40px;
            text-align: center;
            color: #7f8c8d;
            font-size: 14px;
        }
        
        @media (max-width: 768px) {
            .content {
                flex-direction: column;
            }
            
            .error-panel, .test-panel {
                min-width: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>OA系统接口异常分析与解决方案</h1>
            <p class="subtitle">诊断和解决API请求过程中出现的问题</p>
        </header>
        
        <div class="content">
            <div class="error-panel">
                <div class="error-icon">
                    <i class="fas fa-exclamation-triangle"></i>
                </div>
                <h2 class="error-title">请求异常</h2>
                <p class="error-desc">
                    您所请求的网页出现异常，这可能是由于接口参数错误、身份验证问题或服务器内部错误导致的。
                </p>
                <p class="error-desc">
                    请使用右侧的测试工具验证您的API请求参数，或参考下方的故障排除步骤。
                </p>
            </div>
            
            <div class="test-panel">
                <h2 class="panel-title"><i class="fas fa-api"></i> API接口测试工具</h2>
                
                <div class="form-group">
                    <label for="requestId">Request ID</label>
                    <input type="text" id="requestId" value="1304197" placeholder="请输入Request ID">
                </div>
                
                <div class="form-group">
                    <label for="userId">User ID</label>
                    <input type="text" id="userId" value="23844" placeholder="请输入User ID">
                </div>
                
                <div class="form-group">
                    <label for="apiUrl">API 地址</label>
                    <input type="text" id="apiUrl" value="http://oa.maxwell-gp.com.cn:8090/api/workflow/paService/getWorkflowRequest" placeholder="请输入API地址">
                </div>
                
                <button class="btn btn-test" onclick="testAPI()">
                    <i class="fas fa-play-circle"></i> 测试接口
                </button>
                
                <div class="response-area">
                    <h3 class="response-title">响应结果</h3>
                    <div class="response-content" id="responseContent">
                        // 响应将显示在这里
                    </div>
                </div>
            </div>
        </div>
        
        <div class="troubleshoot">
            <h2 class="troubleshoot-title">故障排除步骤</h2>
            
            <div class="steps">
                <div class="step">
                    <div class="step-number">1</div>
                    <h3 class="step-title">检查网络连接</h3>
                    <p class="step-desc">确保您的设备可以访问OA服务器，并且网络连接稳定。</p>
                </div>
                
                <div class="step">
                    <div class="step-number">2</div>
                    <h3 class="step-title">验证API参数</h3>
                    <p class="step-desc">确认Request ID和User ID参数正确，且具有访问权限。</p>
                </div>
                
                <div class="step">
                    <div class="step-number">3</div>
                    <h3 class="step-title">检查身份验证</h3>
                    <p class="step-desc">确保APPID、Token和加密参数正确，且没有过期。</p>
                </div>
                
                <div class="step">
                    <div class="step-number">4</div>
                    <h3 class="step-title">联系技术支持</h3>
                    <p class="step-desc">如果问题持续存在，请联系系统管理员或技术支持团队。</p>
                </div>
            </div>
        </div>
        
        <footer>
            <p>© 2023 OA系统技术支持 | 提供安全可靠的办公自动化服务</p>
        </footer>
    </div>

    <script>
        function testAPI() {
            const requestId = document.getElementById('requestId').value;
            const userId = document.getElementById('userId').value;
            const apiUrl = document.getElementById('apiUrl').value;
            
            const responseContent = document.getElementById('responseContent');
            
            // 显示加载状态
            responseContent.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 正在发送请求...';
            
            // 模拟API请求（实际环境中应使用fetch或XMLHttpRequest）
            setTimeout(() => {
                // 这里是模拟的响应，实际环境中应该替换为真实的API响应
                responseContent.innerHTML = `{
  "code": "500",
  "message": "内部服务器错误",
  "details": "您所请求的网页出现异常，可能是由于以下原因：\n1. 接口参数不正确\n2. 身份验证失败\n3. 服务器内部错误",
  "suggestion": "请检查请求参数是否正确，确认Token没有过期，或联系系统管理员。"
}`;
            }, 1500);
        }
        
        // 初始加载时显示示例响应
        window.onload = function() {
            document.getElementById('responseContent').innerHTML = `{
  "status": "等待测试",
  "message": "请输入参数并点击'测试接口'按钮"
}`;
        };
    </script>
</body>
</html>